/**
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-12 11:13:15
 * @Description  : 一些常用的JOI验证模型
 */
const Joi = require('joi')
const IS_INTEGER = Joi.number().integer()
const IS_UNSAFE_INTEGER = Joi.string().pattern(/^-?\d{1,21}$/)
const IS_UNSAFE_INTEGER_2 = IS_INTEGER.unsafe()
const MSG_CODE = Joi.string().pattern(/^\d{4}$/)
module.exports = {
  IS_INTEGER,
  IS_UNSAFE_INTEGER,
  IS_UNSAFE_INTEGER_2,
  MSG_CODE
}
